/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package percussiongenerator.sound;

import java.util.Collection;
import java.util.HashMap;

/**
 *
 * @author jannes
 */
public class DrumkitHelp{

    public static HashMap<String,Integer> nameToPitchStandardRoomPower = createNameToPitch();
    public static HashMap<Integer,String> pitchToNameStandardRoomPower = createPitchToName();

    public static HashMap<String,Integer> createNameToPitch(){
        HashMap<String,Integer> result = new HashMap<String,Integer>();
        result.put("Bass Drum 2",35);
        result.put("Bass Drum 1",36);
        result.put("Side Stick/Rimshot",37);
        result.put("Snare Drum 1",38);
        result.put("Hand Clap",39);
        result.put("Snare Drum 2",40);
        result.put("Low Tom 2",41);
        result.put("Closed Hi-hat",42);
        result.put("Low Tom 1",43);
        result.put("Pedal Hi-hat",44);
        result.put("Mid Tom 2",45);
        result.put("Open Hi-hat",46);
        result.put("Mid Tom 1",47);
        result.put("High Tom 2",48);
        result.put("Crash Cymbal 1",49);
        result.put("High Tom 1",50);
        result.put("Ride Cymbal 1",51);
        result.put("Chinese Cymbal",52);
        result.put("Ride Bell",53);
        result.put("Tambourine",54);
        result.put("Splash Cymbal",55);
        result.put("Cowbell",56);
        result.put("Crash Cymbal 2",57);
        result.put("Vibra Slap",58);
        result.put("Ride Cymbal 2",59);
        result.put("High Bongo",60);
        result.put("Low Bongo",61);
        result.put("Mute High Conga",62);
        result.put("Open High Conga",63);
        result.put("Low Conga",64);
        result.put("High Timbale",65);
        result.put("Low Timbale",66);
        result.put("High Agogô",67);
        result.put("Low Agogô",68);
        result.put("Cabasa",69);
        result.put("Maracas",70);
        result.put("Short Whistle",71);
        result.put("Long Whistle",72);
        result.put("Short Güiro",73);
        result.put("Long Güiro",74);
        result.put("Claves",75);
        result.put("High Wood Block",76);
        result.put("Low Wood Block",77);
        result.put("Mute Cuíca",78);
        result.put("Open Cuíca",79);
        result.put("Mute Triangle",80);
        result.put("Open Triangle",81);
        return result;
    }

    public static HashMap<Integer,String> createPitchToName(){
        HashMap<Integer,String> result = new HashMap<Integer, String>();
        result.put(35,"Bass Drum 2");
        result.put(36,"Bass Drum 1");
        result.put(37,"Side Stick/Rimshot");
        result.put(38,"Snare Drum 1");
        result.put(39,"Hand Clap");
        result.put(40,"Snare Drum 2");
        result.put(41,"Low Tom 2");
        result.put(42,"Closed Hi-hat");
        result.put(43,"Low Tom 1");
        result.put(44,"Pedal Hi-hat");
        result.put(45,"Mid Tom 2");
        result.put(46,"Open Hi-hat");
        result.put(47,"Mid Tom 1");
        result.put(48,"High Tom 2");
        result.put(49,"Crash Cymbal 1");
        result.put(50,"High Tom 1");
        result.put(51,"Ride Cymbal 1");
        result.put(52,"Chinese Cymbal");
        result.put(53,"Ride Bell");
        result.put(54,"Tambourine");
        result.put(55,"Splash Cymbal");
        result.put(56,"Cowbell");
        result.put(57,"Crash Cymbal 2");
        result.put(58,"Vibra Slap");
        result.put(59,"Ride Cymbal 2");
        result.put(60,"High Bongo");
        result.put(61,"Low Bongo");
        result.put(62,"Mute High Conga");
        result.put(63,"Open High Conga");
        result.put(64,"Low Conga");
        result.put(65,"High Timbale");
        result.put(66,"Low Timbale");
        result.put(67,"High Agogô");
        result.put(68,"Low Agogô");
        result.put(69,"Cabasa");
        result.put(70,"Maracas");
        result.put(71,"Short Whistle");
        result.put(72,"Long Whistle");
        result.put(73,"Short Güiro");
        result.put(74,"Long Güiro");
        result.put(75,"Claves");
        result.put(76,"High Wood Block");
        result.put(77,"Low Wood Block");
        result.put(78,"Mute Cuíca");
        result.put(79,"Open Cuíca");
        result.put(80,"Mute Triangle");
        result.put(81,"Open Triangle");
        return result;
    }

    public static int getPitch(String name){
        return nameToPitchStandardRoomPower.get(name);
    }

    public static String getName(int pitch){
        return pitchToNameStandardRoomPower.get(pitch);
    }

    public static Collection<String> getNames(){
        return pitchToNameStandardRoomPower.values();
    }
}
